package com.seadragon.apps.doctorcard.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.seadragon.apps.doctorcard.model.Contact;
import com.seadragon.apps.doctorcard.model.DoctorCardResult;

public interface ContactService {
	Contact save(Contact contact);
	void update(Contact contact);
	Contact findById(long id);
	Contact findByUUID(String uuid);
	Contact findByDoctorCardId(String doctorCardId);
	Contact findByMobile(String mobile);
	Contact findByEmail(String email);
	List<Contact> findByName(String name);
	Contact login(String username, String password);
	boolean isMobileExisted(String mobile,Contact excludeContact);
	boolean isDoctorCardIdExisted(String doctorCardId,Contact excludeContact);
	boolean isEmailExisted(String email,Contact excludeContact);
	List<String> findAllUuid();
	Page<Contact> findAll(Pageable pageable);
	int resetPassword(String token, String password);
	Contact findByToken(String token);
	Contact forgotPassword(String email);
	boolean isTokenExisted(String token);
	boolean isContactExisted(Contact contact);
	List<Contact> search(Contact contact, String keyword);
	DoctorCardResult changePassword(Contact contact, String oldPassword, String newPassword);
}
